interface A{
 void fun();
}
public class Test {
    public static void main(String[] args) {
       new  A(){
         public void fun(){
              System.out.println("hahah");
          }
        }.fun();
       A a=new A() {
           @Override
           public void fun() {
               System.out.println("哈哈");
           }
       };
       a.fun();
    }
}
